package com.lightsaber.trade.as.entity.reta;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.lightsaber.trade.core.entity.BaseEntity;

/**
 * Alarm.
 */
@Entity
@Table(name = "reta_order_template_item")
public class OrderTemplateItem extends BaseEntity {

    @Column(name = "price")
    private Float price;

    @Column(name = "number")
    private Float number;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "product_id", updatable=false)
    private Product product;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "order_template_id", updatable=false)
    private OrderTemplate orderTemplate;

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public OrderTemplate getOrderTemplate() {
        return orderTemplate;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Float getNumber() {
        return number;
    }

    public void setNumber(Float number) {
        this.number = number;
    }

    public void setOrderTemplate(OrderTemplate orderTemplate) {
        this.orderTemplate = orderTemplate;
    }

}
